package cn.chia.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.chia.front.dao.ICatagorgyDAO;
import cn.chia.pojo.TblCatagorgy;
import cn.chia.service.ICatagorgyService;


@Service
public class CatagorgyServiceImpl implements ICatagorgyService {

	private ICatagorgyDAO catagorgyDAOImpl; 
	
	/**
	 * @author Administrator
	 * @Todo 查询全部一级分类信息
	 * @return
	 */
	public List<TblCatagorgy> getByFirst() {
		return catagorgyDAOImpl.getByFirst();
	}
	/**
	 * @author Administrator
	 * @param catagorgyId 一级分类对应的id值
	 * @Todo 查询某个一级所对应二级分类信息
	 * @return
	 */
	public List<TblCatagorgy> getBySecond(Integer catagorgyId) {
		return catagorgyDAOImpl.getBySecond(catagorgyId);
	}
	
	@Resource(name="catagorgyDAOImpl")
	public void setCatagorgyDAOImpl(ICatagorgyDAO catagorgyDAOImpl) {
		this.catagorgyDAOImpl = catagorgyDAOImpl;
	}
	
}
